<%@ page contentType="text/html; charset=UTF-8" %>

<%@ taglib uri="/WEB-INF/tlds/struts-html.tld"  prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld"  prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/custom-html.tld" prefix="chtml" %>

<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.Collection" %>
<%@ page import="com.erp.app.util.web.WebUtil" %>
<%@ page import="com.erp.framework.util.CommonUtil" %>
<%@ page import="com.erp.app.report.genericInquiry.inquiryMaster.beans.*" %>
<%@ page import="com.erp.app.report.genericInquiry.inquiryDisplay.beans.vo.*" %>
<%@ page import="com.erp.app.report.genericInquiry.*"%>
<%@ page import="com.erp.app.report.genericInquiry.GenericInquiryConstants"%>

<jsp:useBean id="genericInquirySearchForm" scope="session" type="GenericInquirySearchForm" />
<bean:define id="masterVO" name="genericInquirySearchForm" property="genericInquiryMasterVO" type="GenericInquiryMasterVO"/>

<% 	Collection list = masterVO.getLocalChilds(InquiryDisplayVO.class);
	pageContext.setAttribute("list", list);
	boolean showToggleButton = false;
%>
<tr class="grid_header">
<logic:iterate id="header" name="list" indexId="idx" type="InquiryDisplayVO">
<%	String displayName = header.getDispName();
	String hiddenFlag = CommonUtil.nullToString(header.getHiddenFlag());
	String columnWidth = CommonUtil.nullToString(header.getColumnWidth());
	boolean isDisplayURL = GenericInquiryConstants.YES.equals(header.getDispURL());
	
	if (!showToggleButton && hiddenFlag.equals(GenericInquiryConstants.FLAG_HIDDEN))
		showToggleButton = true;
%>
	<td class="col_label" style="text-align:center;<%=columnWidth.equals("") ? "" : "width:" + columnWidth + "px;" %><%= hiddenFlag.equals(GenericInquiryConstants.FLAG_HIDDEN) ? "color:yellow" : ""%>" <%=hiddenFlag.equals(GenericInquiryConstants.FLAG_HIDDEN) ? "id=\"" + GenericInquiryConstants.ID_TAGGED_HIDDEN + "\"" : ""%>><%=displayName%></td>
</logic:iterate>
</tr>
<%	if (!showToggleButton) { %>
<script language="javascript">
	var e = document.getElementById("toggleHidden");
	if (e)
		e.style.display = "none";
</script>
<%	} %>